load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "column",
    srcs = [
        "column.go",
        "convert.go",
        "result_encoder.go",
    ],
    importpath = "github.com/pingcap/tidb/pkg/server/internal/column",
    visibility = ["//pkg/server:__subpackages__"],
    deps = [
        "//pkg/parser/charset",
        "//pkg/parser/mysql",
        "//pkg/planner/core/resolve",
        "//pkg/server/err",
        "//pkg/server/internal/dump",
        "//pkg/server/internal/util",
        "//pkg/types",
        "//pkg/util/chunk",
        "//pkg/util/hack",
        "//pkg/util/logutil",
        "@org_uber_go_zap//:zap",
    ],
)

go_test(
    name = "column_test",
    timeout = "short",
    srcs = [
        "column_test.go",
        "result_encoder_test.go",
    ],
    embed = [":column"],
    flaky = True,
    shard_count = 5,
    deps = [
        "//pkg/parser/charset",
        "//pkg/parser/mysql",
        "//pkg/server/internal/util",
        "//pkg/types",
        "//pkg/util/chunk",
        "//pkg/util/context",
        "@com_github_stretchr_testify//require",
    ],
)
